(function() {
    let arr = [
        [10, 10, 9],
        [16, 16, 40],
        [28, 28, 99]
    ];
    let btns = document.getElementsByTagName('button');
    for (let i = 0; i < btns.length - 1; i++) {
        btns[i].onclick = function() {
            for (let j = 0; j < btns.length - 1; j++) {
                btns[j].className = '';
            }
            this.className = 'active';
            let mine = new Mine(...arr[i]);
            mine.init();
            btns[3].onclick = function() {
                mine = new Mine(...arr[i]);
                mine.init();
            }

        }

    }
    btns[0].click();
})()